import copy
from pathlib import Path

name_cache = {}

def register(name: str):
    def decorator(cls):
        name_cache[name] = cls
        return cls
    return decorator

if __name__ == '__main__':
    import time
    nowT = time.strftime('%Y-%m-%d-%H_%M_%S', time.localtime())
    nowT_abbrev = time.strftime("%D-%T", time.localtime())
    # t=(Path(__file__).parent)/nowT
    # t.mkdir(parents=True,exist_ok=True)

    @register('name_test')
    class NameExample():
        def __init__(self):
            pass

    example = name_cache['name_test']

    print(nowT)

